package cn.rongdao.jrkabao.model.message;

import com.mifengkong.frtools.http.request.HttpFunction;

import java.util.List;

import cn.rongdao.jrkabao.bean.message.MessageBean;
import cn.rongdao.jrkabao.model.api.BaseKaMaoModel;
import io.reactivex.Observable;
import io.reactivex.Observer;

/**
 * Created by jack on 2017/8/17
 */

public class MessageModel extends BaseKaMaoModel {

    public static MessageModel getInstance() {
        return getPresent(MessageModel.class);
    }

    public void execute(Observer<List<MessageBean>> observer) {
        Observable<List<MessageBean>> observable = mServletApi.getMyMessage(mParams).map(new HttpFunction<List<MessageBean>>());
        toSubscribe(observable, observer);
    }
}
